from superdice.superdice import registerRoll, unregisterRoll

def unload():
    unregisterRoll(diceRoll)

def diceRoll(userid, player, eplayer):
    hasknife = eplayer.hasWeapon('weapon_knife')
    hasc4 = eplayer.hasWeapon('weapon_c4')
    eplayer.stripPlayer()
    if hasknife:
        eplayer.givePlayer('weapon_knife')

    if hasc4:
        eplayer.givePlayer('weapon_c4')

registerRoll(diceRoll, 'strip')
